<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">
    <todo-item :cur-name="curName"></todo-item>
</div>
<script>
    const vueOpt = {
        data(){
            return {
                curName: 'kenny.bai'
            }
        }
    }

    const app = Vue.createApp(vueOpt);
    app.component('todo-item',
        {
            data(){
                return {
                }
            },

            computed:{
              myName(){
                  return this.curName
              }
            },

            props: ['curName'],
            template:  `
                <div>curName: {{myName}}</div>
            `
        }
    )

    const vm = app.mount('#app');
    setInterval(()=>{

        vm.$data.curName = vm.$data.curName.toString().split('').reverse().join('')
    }, 1000);
</script>
</body>
</html>
